package com.ql.mangersystem.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Entity com.ql.mangersystem.entity.po.FileOperation
 */
@Mapper
public interface FileOperationMapper {

    @Insert("insert into `file_operation` (time,operations,file_id) " +
            "values(#{now},#{operation},#{fileId}) ")
    int uploadInsert( @Param("now") LocalDateTime now, @Param("operation") Integer operation,@Param("fileId") Integer fileId);

    @Insert("insert into `file_operation` (time,operations,file_id)" +
            "values (#{now},#{operation2},#{id})"
    )
    int insertDownload(@Param("id") Integer id, @Param("now") LocalDateTime now, @Param("operation2") Integer operation2);

    @Insert("insert into `file_operation`(time,operations,file_id) values (#{now},#{operation3},#{id})")
    int insertEdit(@Param("id") Integer id, @Param("now") LocalDateTime now, @Param("operation3") Integer operation3);

    int logicDelBatch(@Param("ids") List<Integer> ids,@Param("now") LocalDateTime now ,@Param("operation") Integer operation);
}




